# @Author  : sdlyxyf@163.com
# @File    : urls.py
# @Software: PyCharm
# @Time    : 2022/5/11 22:54

from django.urls import path,include
from web.views import manage
from web.views import account,project,wiki,file

urlpatterns=[
    path('register/',account.register,name='register'),
    path('login/',account.login,name='login'),
    path('login/sms/',account.login_sms,name='login_sms'),
    path('logout/',account.logout,name='logout'),
    path('index/',account.index,name='index'),
    path('send/sms/',account.send_sms,name='send_sms'),
    path('image/code/',account.image_code,name='image_code'),
    path('',account.index),

    path('project',project.project_list,name='project_list'),
    path('project/star/<str:project_type>/<int:project_id>/', project.project_star, name='project_star'),
    path('project/unstar/<str:project_type>/<int:project_id>/', project.project_unstar, name='project_unstar'),

    path('manage/<int:project_id>/', include([
        path('wiki/',wiki.wiki,name='wiki'),
        path('wiki/add/',wiki.wiki_add,name='wiki_add'),
        path('wiki/catalog/', wiki.wiki_catalog, name='wiki_catalog'),
        path('wiki/delete/<int:wiki_id>/', wiki.wiki_delete, name='wiki_delete'),
        path('wiki/edit/<int:wiki_id>/', wiki.wiki_edit, name='wiki_edit'),
        path('wiki/upload/', wiki.wiki_upload, name='wiki_upload'),


        path('dashboard/', manage.dashboard, name='dashboard'),
        path('issues/', manage.issues, name='issues'),
        path('statistics/', manage.statistics, name='statistics'),
        path('setting/', manage.setting, name='setting'),

        path('file/', file.file, name='file'),
        path('file/delete/',file.file_delete,name='file_delete'),
        path('cos/credential/', file.cos_credential, name='cos_credential'),
        path('file/post',file.file_post,name='file_post'),


        ])),

]